<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    /* 将里边的小盒子相对父级左边距30px */
    .box{
        width: 300px;
        height: 300px;
        background-color: red;

        /* 第一种方式 */
        /* padding-left: 30px;
        box-sizing: border-box; */
        /* 第二种方式 */
        /* overflow: auto; */

        padding-top: 100px;
        box-sizing: border-box;
    }
    .container{
        width: 100px;
        height: 100px;
        /* 第二种方式 */
        /* margin-left: 30px;
        margin-top: 30px; */
        margin-left: 100px;
        background-color: aqua;
    }
</style>
<body>
    <div class="box">
        <div class="container"></div>
    </div>
</body>
</html>